package NewCoder;

public class BM1 {
    public ListNode ReverseList(ListNode head) {
        if(head==null || head.next==null) return head;
        ListNode secHead=head.next;
        ListNode newHead=ReverseList(secHead);
        secHead.next=head;
        head.next=null;
        return newHead;
    }
}
